# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ktnef
pkgver=20.04.3
pkgrel=0
pkgdesc="API for handling TNEF data"
arch="all !armhf"
url="https://kontact.kde.org/"
license="LGPL-2.0-or-later"
depends_dev="qt5-qtbase-dev kcalendarcore-dev kcalutils-dev kcontacts-dev ki18n-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/ktnef-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="9cf7df507840d05bdba49e01b41eb3d82db6c2630468796d043fdfe1215c5f3f4efdafd676d5c4cecbc7536139d78f7043144ebecb81077d6a7a8bcd9aae5ce5  ktnef-20.04.3.tar.xz"
